﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DangNhap.aspx.cs" Inherits="DangNhap" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        *
        {
            margin: 0;
            padding: 0;
            font-family: Calibri;
        }
        body
        {
            background-color: #DCDCDC;
        }
        .background
        {
            background: Url('/App_Themes/Theme/Images/Design/bg-login.jpg');
            min-height: 474px;
            height: 474px;
            padding-top: 150px;
            width: 1007px;
            margin: 0 auto;
        }
        .conten
        {
            min-width: 487px;
            min-height: 317px;
            height: 317px;
            width: 487px;
            margin: 0px auto;
            background: Url('/App_Themes/Theme/Images/Design/bg-conten-login.jpg') no-repeat;
            border-radius: 5px;
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
        }
        .bgbot
        {
            background: Url('/App_Themes/Theme/Images/Design/bg-bot-login.jpg') no-repeat;
            height: 230px;
            margin-top: -30px;
        }
        .title
        {
            background: Url('/App_Themes/Theme/Images/Design/login-title.gif') no-repeat;
            height: 63px;
            position: absolute;
            top: 20px;
            left: -11px;
            width: 260px;
        }
        .icon
        {
            background: Url('/App_Themes/Theme/Images/Design/icon-login.jpg') no-repeat;
            height: 79px;
            width: 100px;
            position: absolute;
            top: -33px;
            right: 35px;
        }
        .link
        {
            color: #fff;
        }
        .link:hover
        {
            color: Red;
        }
        .rows
        {
            min-height: 30px;
            height: 30px;
            padding-bottom: 10px;
        }
        .col1
        {
            width: 26%;
            height: 30px;
            float: left;
            line-height: 30px;
            color: #F3F3F2;
            text-align: right;
            padding-right: 5px;
            font-weight: bold;
            font-size: 16px;
        }
        .col2
        {
            width: 71%;
            height: 30px;
            line-height: 30px;
            float: left;
        }
        .text
        {
            width: 315px;
            height: 24px;
            background: Url('/App_Themes/Theme/Images/Design/bg-text.jpg') no-repeat;
            border: none !important;
            border-radius: 8px;
            -moz-border-radius: 8px;
            -webkit-border-radius: 8px;
            padding: 2px 8px;
            outline: 0;
            font-size: 15px;
        }
        .text:focus
        {
            border: 0;
            border-color: red;
        }
        .GiuTT
        {
            color: #A9A190;
            position: absolute;
            right: 30px;
            padding: 0px 3px;
            font-size: 15px;
        }
        .GiuTT input
        {
            margin-left: 5px;
            color: White;
            font-size: 15px;
        }
        .button
        {
            float: right;
            margin-right: 10px;
        }
    </style>
    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        function ibtDangNhap_Click() {
            var TenDangNhap = $('#<%=txtTenDN.ClientID %>');
            var MatKhau = $('#<%=txtMatKhau.ClientID%>');
            var ThongBao = $('#<%=lbThongBao.ClientID %>');
            var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/;
            if (trim(TenDangNhap.val()) == '') {
                ThongBao.html('Tên đăng nhập không được để trống');
                TenDangNhap.focus();
                return false;
            }
            if (!emailFilter.test(trim(TenDangNhap.val()))) {
                ThongBao.html('Tên đăng nhập không đúng định dạng mail');
                TenDangNhap.focus();
                return false;
            }
            if (trim(MatKhau.val()) == '') {
                ThongBao.html('Mật khẩu không được để trống');
                MatKhau.focus();
                return false;
            }
            if (trim(MatKhau.val()).length < 6) {
                ThongBao.html('Mật khẩu phải lớn hơn hoặc bằng 6 ký tự');
                MatKhau.focus();
                return false;
            }
            return true;
        }
        function trim(s) {
            return s.replace(/^\s+|\s+$/, '');
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="background">
        <div class="conten">
            <div style="position: relative; height: 80px">
                <div class="title">
                </div>
                <div class="icon">
                </div>
            </div>
            <div style="padding: 15px 3px 10px 3px; min-height: 20px; text-align: center; font-size: 16px;
                color: #DD4B39;">
                <asp:Label runat="server" ID="lbThongBao"></asp:Label>
            </div>
            <div>
                <div class="rows">
                    <div class="col1">
                        Tên đăng nhập
                    </div>
                    <div class="col2">
                        <asp:TextBox runat="server" ID="txtTenDN" CssClass="text"></asp:TextBox>
                    </div>
                </div>
                <div class="rows">
                    <div class="col1">
                        Mật khẩu
                    </div>
                    <div class="col2">
                        <asp:TextBox runat="server" ID="txtMatKhau" TextMode="Password" CssClass="text"></asp:TextBox>
                    </div>
                </div>
                <div class="rows" style="position: relative;">
                    <asp:CheckBox runat="server" ID="ckTrangThai" CssClass="GiuTT" Text="Duy trì trạng thái đăng nhập"
                        TextAlign="Left" />
                </div>
                <div class="rows" style="padding-right: 20px;">
                    <asp:ImageButton runat="server" ID="ibtDangNhap" CssClass="button" ImageUrl="~/App_Themes/Theme/Images/Design/bt-DangNhap.jpg" />
                    <asp:ImageButton runat="server" CssClass="button" ID="ibtDangKy" ImageUrl="~/App_Themes/Theme/Images/Design/bt-DangKy.jpg" />
                </div>
            </div>
        </div>
        <div class="bgbot">
        </div>
    </div>
    </form>
</body>
</html>
